import request from "./request";

const getToken = async (data) => {
    return await request({
        url: "/api/login",
        method: "post",
        data: data,
    })
}

const refreshToken = async (refresh_token) => {
    return request({
        url: "/api/refresh",
        method: "post",
        data: {
            refresh_token: refresh_token
        }
    })
}

const checkToken = async (token) => {
    return request({
        url: "/api/check",
        method: "post",
        data: {
            token: token
        }
    })
}

export default {
    getToken,
    refreshToken,
    checkToken
}